package top.asteam.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author Rock Wang
 * @Time 2021/4/18
 */
@Configuration
public class MyRibbonRule {

    /**
     * 自定义规则
     * @return RandomRule 随机
     */
    @Bean
    public IRule myRule(){
        return new RandomRule();
    }
}
